<!--
* @Description: 系统配置 - 表单
* @Author: DSY
* @Date: 2022-03-14 22:28:33
 * @LastEditors: DHL
 * @LastEditTime: 2022-06-15 10:41:16
-->
<template>
  <tw-dialog
    v-model="visible"
    :title="title"
    :loading="loading"
    width="600px"
    height="300px"
    @close="handleClose"
  >
    <el-form ref="dbFormRef" :model="dbForm" :rules="rules" label-width="90px">
      <el-form-item label="配置项" prop="name">
        <el-input v-model="dbForm.name" clearable placeholder="请输配置项"></el-input>
      </el-form-item>

      <el-form-item label="配置规则" prop="sysrule">
        <el-input v-model="dbForm.sysrule" clearable placeholder="请输配置规则"></el-input>
      </el-form-item>

      <el-form-item label="配置描述" prop="description">
        <el-input v-model="dbForm.description" clearable placeholder="请输配置描述"></el-input>
      </el-form-item>
    </el-form>

    <template #footer>
      <el-button @click="handleReset(true)">取 消</el-button>
      <el-button v-if="action === 'add'" type="warning" @click="handleSubmit(true)">
        提交并继续
      </el-button>
      <el-button v-if="action !== 'view'" type="primary" @click="handleSubmit(false)">
        提 交
      </el-button>
    </template>
  </tw-dialog>
</template>

<script src="./useForm.ts"></script>

<style scoped lang="scss"></style>
